<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <title>layout 后台大布局 - Layui</title>
  <link rel="stylesheet" href="../../layui/css/layui.css">
</head>
<body class="layui-layout-body">
22222
<script src="../../layui/layui.js"></script>
<script src="../../js/common.js"></script>
<script src="../../js/login-controll.js"></script>
<script>
//JavaScript代码区域
layui.use(['element','layer'], function(){
  var element = layui.element;
  var layer = layui.layer;
  var $ = layui.$;
  $(".logout").click(function(){
    layer.confirm('确定退出吗？', {
            btn: ['确定', '取消'] //可以无限个按钮
    }, function(index, layero){
      //按钮【按钮一】的回调
      $.getJSON(appServerUrl + '/dev/logout2', function(result) {
          if(result.status == 200) {
            sessionStorage.removeItem('userName');
            location.href = "../devLogin.html";
          } else {
            layer.alert('注销失败')
          }
      });
    }, function(index){
      //按钮【按钮二】的回调
    });
    
  })
});
</script>
</body>
</html>